﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Payroll.BusinessLogic.CustomerManager;
using PayrollHR.Web;
using Payroll.Common.Utils;
using Payroll.BusinessLogic;

namespace PayrollHR.Administration.Modules
{
    public partial class CustomerResultSearch : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int UserId = PayrollContext.Current.Session.EmployeeId;
                hfdUserId.Value = CommonHelper.ToString(UserId);
            }
        }
        public CustomerSearchResult GetCustomerSearch()
        {
            CustomerSearchResult customer = new CustomerSearchResult
            {
                CustName = txtCustomerName.Text.Trim(),
                PackageName= txtPackName.Text.Trim(),
                PackageCode=txtMaCode.Text.Trim(),
                UserId = CommonHelper.ToInteger(hfdUserId.Value)
            };
            return customer;
        }
    }
}